package cn.kgc.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/5/10
 * @Description:  /hello
 */
public class HelloServlet extends HttpServlet {

    //  处理前前端发送的get请求
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("========get()=========");
        System.out.println("用户登录的请求被处理");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("========post()=========");
        doGet(req,resp);
    }
}
